<div class="col-md-2 col-xs-height navshadow">
    <ul class="nav nav-sidebar" >
        <div class="image">
            <img src="<?php echo base_url("public/images/sidebar_logo.jpg"); ?>" alt="logo_image" width="100%" height="150px" class="img-circle">
            <h3>Trung taâm</h3>
        </div>



        <?php
        foreach ($typeCenters as $value) {
            ?>
            <li class="<?php if ($idType == $value['id_type_center']) echo 'center-active' ?>"><a href="<?php echo base_url('index.php/website/article/type/' . $value['id_type_center']); ?>" ><?php echo $value['name_type']; ?></a>

                <?php
            }
            ?>

    </ul>
</div>
<div class="col-md-10 col-xs-height">   
    <div class="breadcrumbs" style="margin-top: 3%; margin-bottom: 1%;">
        <ul>
            <li><a href="<?php echo base_url("index.php/website/home"); ?>"><span class="glyphicon glyphicon-home"></span> Trang chủ</a></li>
            <li><a href="<?php echo base_url("index.php/website/article"); ?>"><span class="glyphicon glyphicon-file"></span> Tin Tức</a></li>
        </ul>
    </div>

    <div class="highlight">
        <div class="row">
            <h3><a href="<?= base_url() . 'index.php/website/article/id/' . $article['id_article'] ?>"><?= $article['title'] ?></a></h3>
            <p class="text-muted" style="font-size: 12px;">Ngày đăng: <?= date('H:i d/m/Y', strtotime($article['date'])); ?> Luot Xem: <?= $article['view'] ?></p>
            <hr>
        </div>
        <div class="row">
            <div class="col-md-1">
                <a href="#"><img src="
                    <?php
                    if (!file_exists($article['url_image'])) {
                        if ($article['id_sex'] == 1) {
                            $article['url_image'] = 'public/images/defaut_user/default-user.jpg';
                        } else {
                            $article['url_image'] = 'public/images/defaut_user/default-user-female.jpg';
                        }
                    }
                    echo base_url($article['url_image']);
                    ?>" class="avatar"></a>
            </div>
            <div class="col-md-11">
                <p class="name"><?= $article['first_name'] . ' ' . $article['last_name'] ?></p>
                <!--<p class="company">HCM University of Technology</p>-->
                <p class="email"><?= $article['email']; ?></p>
            </div>
        </div>
    </div>
    <h3>
        <strong><em>Trả lời</em></strong>
    </h3>
    <div class="nav">
        <div class="navbar-right" id="no-margin">
            <?= $comment['link'] ?>
        </div>
    </div>
    <div class="panel panel-info bg-mycolor">
        <?php
        if (!empty($comment['data'])) {
            foreach ($comment['data'] as $row):
                ?>
                <div class="panel panel-default" style="padding: 5px; margin: 1px;">
                    <div class="panel-body" style="padding-top: 0px; padding-bottom: 0px; margin: 2px;">
                        <div class="col-lg-1" style="padding-left: 0px;">
                            <div class=" box-avatar">
                                <a href="#" class="avatar" style="display: block;"><img src="<?php
                                    if (!file_exists($row['url_image'])) {
                                        if ($row['id_sex'] == 1) {
                                            $row['url_image'] = 'public/images/defaut_user/default-user.jpg';
                                        } else {
                                            $row['url_image'] = 'public/images/defaut_user/default-user-female.jpg';
                                        }
                                    }
                                    echo base_url($row['url_image']);
                                    ?>" style=" width: 100%; height: 100%;">
                                </a>
                            </div>
                        </div>
                        <div class="col-lg-11">
                            <strong><?= $row['first_name'] . ' ' . $row['last_name']; ?></strong><br>
                            <p><?= $row['content'] . '.'; ?></p>
                            <span class="text-muted" style=" font-size: 12px;">Vào lúc: <?= date('H:i d/m/Y', strtotime($row['date'])); ?></span>
                        </div>
                    </div>
                </div>
                <?php
            endforeach;
        } else {
            echo '<div id="suggest_comment" class="text-center"><em>Hãy tham gia trả lời nhé.</em></div>';
        }
        ?>
    </div>
    <div class="navbar-right">
        <?= $comment['link'] ?>
    </div>
</div>


